<!DOCTYPE html>
<html>
  <head>
    <title>佣金明细</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	  <link rel="stylesheet" href="${s.base}/mobile/base/css/weui.min.css">
	  <link rel="stylesheet" href="${s.base}/mobile/base/css/jquery-weui.css">
	  <link rel="stylesheet" href="${s.base}/mobile/wechat/css/base.css">
	  <link rel="stylesheet" href="${s.base}/mobile/wechat/css/component.css">
  </head>
  <body>

  <div class="xyg-index">
  <style type="text/css">
	  html,body{background:#f5f5f5;}
	  .xyg-title{width:92%; height:1.5rem; margin:0.5rem 4% 0px 4%; padding-left: 2%; line-height:1.5rem; font-size:0.8rem; color:#000000;}
	  .xyg-couser{width:92%; height:auto; margin:0.2rem 4%;min-height:6rem; }
	  .xyg-couser .xyg-zwyj{width: 100%; height: 6rem; line-height: 6rem; text-align: center;}
	  .xyg-couser .xyg-couser-item{width:96%; height:auto; padding:0.5rem 2%;background: #ffffff; border-radius: 0.2rem; margin-bottom: 0.4rem; }
	  .xyg-couser .xyg-couser-item .xyg-couser-item-line1{width:50%; height:1.2rem; line-height: 1.2rem; font-size: 14px; color: #d9d9d9;float: left;}
	  .xyg-couser .xyg-couser-item .xyg-couser-item-line2{width:100%; line-height: 1.2rem; font-size: 14px; color: #d9d9d9;float: left;}
	  .xyg-couser .xyg-couser-item .xyg-couser-item-name{color:#1b1b1b; letter-spacing: 0.01rem; }
  </style>
  <div class="xyg-couser">


  </div>
	  <!--底部菜单开始-->
	  <div style="width:100%; height:2.5rem;"></div>
	  <div class="xyg-comp-bottom">
		  <div class="xyg-comp-bottom-item">
			  <a href="javascript:goFistPage('${memberId}')">
				  <img src="${s.base}/mobile/wechat/images/menu_icon_1.png"/>
				  <div class="xyg-comp-bottom-item-text">首页</div>
			  </a>
		  </div>
		  <div class="xyg-comp-bottom-item">
			  <a href="javascript:goKhPage('${memberId}')">
				  <img src="${s.base}/mobile/wechat/images/menu_icon_2.png"/>
				  <div class="xyg-comp-bottom-item-text  ">客户</div>
			  </a>
		  </div>
		  <div class="xyg-comp-bottom-item">
			  <a href="javascript:goMyPage('${memberId}')">
				  <img src="${s.base}/mobile/wechat/images/menu_icon_4_a.png"/>
				  <div class="xyg-comp-bottom-item-text select-text">我的</div>
			  </a>
		  </div>
		  <div class="clearBoth"></div>
	  </div>

  </body>
  <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  <script src="${s.base}/mobile/base/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/swiper.js" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/base/js/component.js?12323434323232323232" type="text/javascript" charset="utf-8"></script>
  <script src="${s.base}/mobile/wechat/fonts/iconfont.js"></script>
  <script src="${s.base}/mobile/wechat/js/window_port.js"></script>
  <script src="${s.base}/mobile/wechat/js/base.js"></script>

  <script type="text/javascript">
      var memberId='${memberId}';
      $(document).ready(function(e) {
          initDate();
      });

      function initDate() {
          initContentNum();
      }

      var pageNum = 0;
      var pageSize = 5;
      var loading = false;  //状态标记
      var isDestroy = false;  //状态标记
      /**
       * 初始化内容页面信息
       * @param cityId
       */
      function initContentNum() {
          isDestroy = false;
          $(document.body).infinite().on("infinite", function () {
              if (loading) return;
              loading = true;
              sendPost();
          });
          sendPost();
      }

      function sendPost() {
          pageNum++;
          $.fn.postMethodAll("/weChat/hostDetail/page",{'pageNum':pageNum,'pageSize':pageSize,'memberId':memberId},function (result) {
              if (result.data != null && result.data.length > 0) {
                  result.data.forEach(function (item,key,mapObj) {
                      var str='<div class="xyg-couser-item">'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">购买人：</span>'+item.couserName+'</span>'+
                          '</div>'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">手机号：</span>'+item.couserPhone+'</div>'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">购买楼盘：</span>'+item.itemName+'</div>'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">楼盘总价：</span>'+item.allMoney+'元</div>'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">佣金：</span>'+item.shareMoney+'元</div>'+
                          '<div class="xyg-couser-item-line1">'+
                          '<span class="xyg-couser-item-name">成交时间：</span>'+item.createTimeStr+'</div>'+
                          '<div class="xyg-couser-item-line2">'+
                          '<span class="xyg-couser-item-name">描述：</span>'+item.descripts+'</div>'+
                          '<div class="clearBoth"></div>'+
                          '</div>';
                      $(".xyg-couser").append(str);
                  });
                  loading = false;
                  if (!result.hasNextPage) {
                      $(document.body).destroyInfinite();
                      isDestroy=true;
                  }
              } else {
                  $(document.body).destroyInfinite();
                  isDestroy=true;
                  if(result.count==0){
                      $(".xyg-couser").html('<div class="xyg-zwyj">暂无佣金</div>');
				  }
              }
          });
      }
  </script>
  
</html>

